using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using ICP_MS.iMass.Properties;

namespace ICP_MS.iMass;

public class FormExperimentWizard : Form
{
	private IContainer components = null;

	private RadioButton radioButtonOpenExist;

	private RadioButton radioButtonCreatBlank;

	private RadioButton radioButtonCreatFromExperiment;

	private Button buttonOK;

	private Button buttonCancel;

	private PictureBox pictureBox1;

	public int OperationType { get; set; }

	public FormExperimentWizard()
	{
		InitializeComponent();
		OperationType = 1;
	}

	private void buttonOK_Click(object sender, EventArgs e)
	{
		if (radioButtonOpenExist.Checked)
		{
			OperationType = 0;
		}
		if (radioButtonCreatBlank.Checked)
		{
			OperationType = 1;
		}
		if (radioButtonCreatFromExperiment.Checked)
		{
			OperationType = 2;
		}
		base.DialogResult = DialogResult.OK;
	}

	private void buttonCancel_Click(object sender, EventArgs e)
	{
		base.DialogResult = DialogResult.Cancel;
	}

	private void FormExperimentWizard_Load(object sender, EventArgs e)
	{
		ApplyResources();
	}

	private void ApplyResources()
	{
		Text = Lang.Txt("FormExperimentWizard.Title.Text");
		radioButtonCreatBlank.Text = Lang.Txt("FormExperimentWizard.CreateNewExperiment.Text");
		radioButtonCreatFromExperiment.Text = Lang.Txt("FormExperimentWizard.CreateExperimentFromExisted.Text");
		radioButtonOpenExist.Text = Lang.Txt("FormExperimentWizard.OpenExistingExperiment.Text");
		buttonCancel.Text = Lang.Txt("FormExperimentWizard.Button.Cancel.Text");
		buttonOK.Text = Lang.Txt("FormExperimentWizard.Button.OK.Text");
	}

	protected override void Dispose(bool disposing)
	{
		if (disposing && components != null)
		{
			components.Dispose();
		}
		base.Dispose(disposing);
	}

	private void InitializeComponent()
	{
		this.radioButtonOpenExist = new System.Windows.Forms.RadioButton();
		this.radioButtonCreatBlank = new System.Windows.Forms.RadioButton();
		this.radioButtonCreatFromExperiment = new System.Windows.Forms.RadioButton();
		this.buttonOK = new System.Windows.Forms.Button();
		this.buttonCancel = new System.Windows.Forms.Button();
		this.pictureBox1 = new System.Windows.Forms.PictureBox();
		((System.ComponentModel.ISupportInitialize)this.pictureBox1).BeginInit();
		base.SuspendLayout();
		this.radioButtonOpenExist.AutoSize = true;
		this.radioButtonOpenExist.Location = new System.Drawing.Point(118, 22);
		this.radioButtonOpenExist.Name = "radioButtonOpenExist";
		this.radioButtonOpenExist.Size = new System.Drawing.Size(95, 16);
		this.radioButtonOpenExist.TabIndex = 0;
		this.radioButtonOpenExist.Text = "打开已存测试";
		this.radioButtonOpenExist.UseVisualStyleBackColor = true;
		this.radioButtonCreatBlank.AutoSize = true;
		this.radioButtonCreatBlank.Checked = true;
		this.radioButtonCreatBlank.Location = new System.Drawing.Point(118, 54);
		this.radioButtonCreatBlank.Name = "radioButtonCreatBlank";
		this.radioButtonCreatBlank.Size = new System.Drawing.Size(83, 16);
		this.radioButtonCreatBlank.TabIndex = 1;
		this.radioButtonCreatBlank.TabStop = true;
		this.radioButtonCreatBlank.Text = "创建新测试";
		this.radioButtonCreatBlank.UseVisualStyleBackColor = true;
		this.radioButtonCreatFromExperiment.AutoSize = true;
		this.radioButtonCreatFromExperiment.Location = new System.Drawing.Point(118, 86);
		this.radioButtonCreatFromExperiment.Name = "radioButtonCreatFromExperiment";
		this.radioButtonCreatFromExperiment.Size = new System.Drawing.Size(143, 16);
		this.radioButtonCreatFromExperiment.TabIndex = 2;
		this.radioButtonCreatFromExperiment.Text = "从已存文件创建新测试";
		this.radioButtonCreatFromExperiment.UseVisualStyleBackColor = true;
		this.buttonOK.Location = new System.Drawing.Point(118, 134);
		this.buttonOK.Name = "buttonOK";
		this.buttonOK.Size = new System.Drawing.Size(75, 23);
		this.buttonOK.TabIndex = 4;
		this.buttonOK.Text = "确定";
		this.buttonOK.UseVisualStyleBackColor = true;
		this.buttonOK.Click += new System.EventHandler(buttonOK_Click);
		this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
		this.buttonCancel.Location = new System.Drawing.Point(234, 134);
		this.buttonCancel.Name = "buttonCancel";
		this.buttonCancel.Size = new System.Drawing.Size(75, 23);
		this.buttonCancel.TabIndex = 5;
		this.buttonCancel.Text = "取消";
		this.buttonCancel.UseVisualStyleBackColor = true;
		this.buttonCancel.Click += new System.EventHandler(buttonCancel_Click);
		this.pictureBox1.Image = ICP_MS.iMass.Properties.Resources.Experiment;
		this.pictureBox1.Location = new System.Drawing.Point(12, 22);
		this.pictureBox1.Name = "pictureBox1";
		this.pictureBox1.Size = new System.Drawing.Size(61, 56);
		this.pictureBox1.TabIndex = 6;
		this.pictureBox1.TabStop = false;
		base.AcceptButton = this.buttonOK;
		base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 12f);
		base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
		base.CancelButton = this.buttonCancel;
		base.ClientSize = new System.Drawing.Size(444, 191);
		base.Controls.Add(this.pictureBox1);
		base.Controls.Add(this.buttonCancel);
		base.Controls.Add(this.buttonOK);
		base.Controls.Add(this.radioButtonCreatFromExperiment);
		base.Controls.Add(this.radioButtonCreatBlank);
		base.Controls.Add(this.radioButtonOpenExist);
		base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
		base.MaximizeBox = false;
		base.MinimizeBox = false;
		base.Name = "FormExperimentWizard";
		base.ShowIcon = false;
		base.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
		this.Text = "测试向导";
		base.Load += new System.EventHandler(FormExperimentWizard_Load);
		((System.ComponentModel.ISupportInitialize)this.pictureBox1).EndInit();
		base.ResumeLayout(false);
		base.PerformLayout();
	}
}
